package com.etone.esper.main.epl_sql;

import com.espertech.esper.client.EventBean;
import com.espertech.esper.client.UpdateListener;

public class Updater implements UpdateListener{

	@Override
	public void update(EventBean[] newEvents, EventBean[] oldEvents) {
		long begin = System.currentTimeMillis();
		long costTime = begin - ESPer.sentEventT;
		System.out.println("newEvents 's size " + newEvents.length
				+ "; cost time: " + costTime);
		for(EventBean e :newEvents){
//			System.out.println(e);
//			System.out.println("event: id=" + e.get("id") + " age=" + e.get("age"));
			
//			System.out.println("event: id=" + e.get("id") + " kid=" + e.get("kid") 
//						+ " age=" + e.get("age"));
		}
		
		System.out.println("oldEvents 's size " + oldEvents );
		
	}

}
